package com.xbai.goods.feign;

import com.xbai.entity.Result;
import com.xbai.goods.pojo.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author jxbai
 * @desc
 * @date 2021/2/3 0003
 */
@FeignClient(value = "goods")
@RequestMapping("/spu")
public interface SpuFeign {

    /***
     * 根据ID查询Spu数据
     * @param id 主键id
     * @return {@link Result<Spu>}
     */
    @GetMapping("/{id}")
    Result<Spu> findById(@PathVariable(name = "id") Long id);
}
